// pages/peccancy/representations.js
const app = getApp()
Page({

    /**
     * 页面的初始数据
     */
    data: {

    },
    onLoad: function(options) {
        this.setData(options)
    },
    submit(evt) {
		console.log(evt,'xxxxxxxxx')
        let content = evt.detail.value.appeal
		if (!content) {
            app.wxToast.warn('请填写申诉内容')
            return
        }
        wx.showLoading({
            title: '请稍等...',
        })
        app.http.post('rest/appeal/save.do', {
            data: {
                relType: 1,
                objId: this.data.id,
                content
            }
        }).then(res => {
            wx.hideLoading()
            wx.showModal({
                title: '温馨提示',
                content: '您申诉的内容已提交',
                showCancel:false,
                confirmColor:'#4DB4FF',
                success:res=>{
                    if(res.confirm){
                        wx.navigateBack({
                            detal: 4
                        })
                    }
                }
            })
            
        })
    }
})